package com.wuxx.quartz.model;

import com.wuxx.quartz.job.QuartzTaskJob;

import java.util.Map;

/**
 * cron触发器model
 * @date 2022/06/08 10:07
 * @author wuxx
 */
public class CronTimingModel extends TimingModel{
    /**
     * cron表达式
     * */
    private String cronExpression;

    public CronTimingModel(Class<? extends QuartzTaskJob> taskClass, String taskName, String groupName, String description, Map<String, Object> param, String cronExpression) {
        super(taskClass, taskName, groupName, description, TriggerType.CRON, param);
        this.cronExpression = cronExpression;
    }

    public CronTimingModel(Class<? extends QuartzTaskJob> taskClass, String taskName, String groupName, String description,String cronExpression) {
        super(taskClass, taskName, groupName, description, TriggerType.CRON);
        this.cronExpression = cronExpression;
    }

    public String getCronExpression() {
        return cronExpression;
    }

    public void setCronExpression(String cronExpression) {
        this.cronExpression = cronExpression;
    }
}
